/*
 * @Description:
 * @Version: 2.0
 * @Autor: wsh
 * @Date: 2023-06-20 10:41:46
 * @LastEditors: uphldjx 1373577124@qq.com
 * @LastEditTime: 2024-07-12 14:16:16
 */
// 政策文件
const policyDocument = (request) => {
	return {
		// 全字段查询
		view_dpPolicyDocument_search(query = {}) {
			return request('/bussiness/dpPolicyDocument/search', {
				method: 'post',
				data: query,
			})
		},
		// 分页查询政策文件数据
		view_dpPolicyDocument_page(query = {}) {
			return request('/bussiness/dpPolicyDocument/page', {
				method: 'post',
				data: query,
			})
		},
		view_dpPolicyDocument_view(id) {
			return request(`/bussiness/dpPolicyDocument/${id}`, {
				method: 'get',
			})
		},
		// 新增政策文件数据
		view_dpPolicyDocument_add(query = {}) {
			return request('/bussiness/dpPolicyDocument/add', {
				method: 'post',
				data: query,
			})
		},
		// 删除政策文件数据
		view_dpPolicyDocument_del(ids) {
			return request('/bussiness/dpPolicyDocument/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
		// 修改政策文件数据
		view_dpPolicyDocument_edit(query = {}) {
			return request('/bussiness/dpPolicyDocument/edit', {
				method: 'post',
				data: query,
			})
		},
		// 补贴政策文件数据
		view_subsidyPolicyDocument_page(query = {}) {
			return request('/bussiness/dpPolicyDocument/subsidy/page', {
				method: 'post',
				data: query,
			})
		},
	}
}

export const iccPunchRecord = (request: any) => ({
	//指静脉 打卡记录
	view_iccPunchRecord_page: (query = {}) => {
		return request('/application/iccPunchRecord/page', {
			method: 'post',
			data: query,
		})
	},
	//指静脉 详情
	view_iccPunchRecord_view: (id) => {
		return request(`/application/iccPunchRecord/${id}`, {
			method: 'get',
		})
	},
	//指静脉 打卡记录-导出
	view_iccPunchRecord_export: (query = {}) => {
		return request('/application/iccPunchRecord/export', {
			method: 'post',
			data: query,
		})
	},
	//指静脉 审批列表
	view_iccVeinApprove_page: (query = {}) => {
		return request('/application/iccVeinApprove/page', {
			method: 'post',
			data: query,
		})
	},
	//指静脉 编辑
	view_iccVeinApprove_edit: (query = {}) => {
		return request('/application/iccVeinApprove/edit', {
			method: 'post',
			data: query,
		})
	},
})
// 五类老人补贴
export const ofsSubsidyApplyElderly = (request: any) => ({
	// 老人申请列表
	view_ofsSubsidyApplyElderly_apply_list: (query = {}) => {
		return request('/application/ofsSubsidyApplyElderly/applyList', {
			method: 'post',
			data: query,
		})
	},
	// 老人申请审核列表
	view_ofsSubsidyApplyElderly_apply_approval_list: (query = {}) => {
		return request('/application/ofsSubsidyApplyElderly/applyApprovalList', {
			method: 'post',
			data: query,
		})
	},
	//待申请的五类老人列表
	view_ofsSubsidyApply_ready_elderly: (query = {}) => {
		return request('/application/ofsSubsidyApply/getReadyApplyElderlyList', {
			method: 'post',
			data: query,
		})
	},
	//待申请的五类老人列表(分组)
	view_ofsSubsidyApply_ready_elderly_map: (query = {}) => {
		return request('/application/ofsSubsidyApply/getReadyApplyElderlyMap', {
			method: 'post',
			data: query,
		})
	},
	// 新增五类老人的申请[批量]
	view_ofsSubsidyApply_save_elderly_batch: (query) => {
		return request('/application/ofsSubsidyApply/saveElderlyApplyBatch', {
			method: 'post',
			data: query,
		})
	},
	// 停止发放五类老人的申请
	view_ofsSubsidyApplyElderly_stop_aid: (query) => {
		return request('/application/ofsSubsidyApplyElderly/stopAid', {
			method: 'post',
			data: query,
		})
	},
	// 编辑老人的信息
	view_ofsSubsidyApplyElderly_edit: (query) => {
		return request('/application/ofsSubsidyApplyElderly/edit', {
			method: 'post',
			data: query,
		})
	},
	// 输入月份获取人数
	view_ofsSubsidyApply_elderly_amount_summary: (query) => {
		return request('/application/ofsSubsidyApply/getAmountDetailSummary', {
			method: 'post',
			data: query,
		})
	},
	// 点月份或人数获取人数的详情
	view_ofsSubsidyApply_elderly_amount_page: (query) => {
		return request('/application/ofsSubsidyApply/getApplyAmountPage', {
			method: 'post',
			data: {...query,authCommunity:undefined},
		})
	},
	// 获取表格中机构的基础数据和人员
	view_application_subsidy_org_base_info: (query) => {
		return request('/bussiness/comprehensivesubsidy/getApplicationSubsidyOrgBaseInfo', {
			method: 'post',
			data: query,
		})
	},
	// 获取待减免，冲抵费用的五类老人列表待添加的老人列表
	view_ofsSubsidyApply_elderly_amount_list: (query) => {
		return request('/application/ofsSubsidyApply/getReadyApplyAmountList', {
			method: 'post',
			data: query,
		})
	},
	// 删除单个或多个已添加的老人
	view_ofsSubsidyAmountDetail_del: (ids) => {
		return request('/application/ofsSubsidyAmountDetail/del', {
			method: 'post',
			data: {
				batchesDel: ids,
			},
		})
	},
	// 单个添加老人
	view_ofsSubsidyAmountDetail_add: (query) => {
		return request('/application/ofsSubsidyAmountDetail/add', {
			method: 'post',
			data: query,
		})
	},
	// 批量添加老人
	view_ofsSubsidyAmountDetail_save_batch: (query) => {
		return request('/application/ofsSubsidyAmountDetail/saveAmountDetailBatch', {
			method: 'post',
			data: query,
		})
	},
})
export const subsidy = (request: any) => ({
	// 从业人员入职补贴，表格数据
	view_subsidy_onBoarding: (query) => {
		return request('/bussiness/staffsubsidy/onBoarding', {
			method: 'post',
			data: query,
		})
	},
	// 从业人员入职补贴，筛选从业人员
	view_subsidy_page: (query) => {
		return request('/bussiness/staffsubsidy/page', {
			method: 'post',
			data: query,
		})
	},
	// 从业人员岗位补贴，表格数据
	view_subsidy_postAllowance: (query) => {
		return request('/bussiness/staffsubsidy/postAllowance', {
			method: 'post',
			data: query,
		})
	},
	// 从业人员岗位补贴，筛选从业人员
	view_postAllowance_page: (query) => {
		return request('/bussiness/staffsubsidy/postAllowance/page', {
			method: 'post',
			data: query,
		})
	},
})
export default ({ request }: any) => ({
	...policyDocument(request),
	...iccPunchRecord(request),
	...ofsSubsidyApplyElderly(request),
	...subsidy(request),
})
